<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>保单退保填写</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.css" integrity="sha512-++bHK0UNrNHW3LVNLzgTm2G7uOH6Kd+Ved0sskOL0+TY7pr5AcWQgR19kdjAhyyiQRDjFwXubDGqTvjnS09HNA==" crossorigin="anonymous" referrerpolicy="no-referrer" />

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha512-jGsMH83oKe9asCpkOVkBnUrDDTp8wl+adkB2D+//JtlxO4SrLoJdhbOysIFQJloQFD+C4Fl1rMsQZF76JjV0eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js" integrity="sha512-rstIgDs0xPgmG6RX1Aba4KV5cWJbAMcvRCVmglpam9SoHZiUCyQVDdH2LPlxoHtrv17XWblE/V/PP+Tr04hbtA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <![endif]-->
    <style>
        .m8 {
            margin-top: 8px;
        }

        .ml20 {
            margin-left: 20px;
        }

        .tl {
            text-align: left;
        }

        .red {
            color: red;
            font-weight: bolder;
        }
    </style>
    <script>
        $().ready(function(){
            var messageBody = $("#messageBody")
            var resultMessage = $("#resultMessage");
            $("#refund_button").click(function (){
                $.post({
                    url:'${path}/insurance/user/order/surrender?id='+'${order.id!""}'+'&sign=${order.sign!""}',
                    success:function (result){
                        console.info(result);
                        if(result.code === 200){
                            alert("退保成功")
                            window.close();
                        }else {
                            messageBody.html(result.message)
                            resultMessage.modal()
                        }
                    }
                })
            })
        })

    </script>
</head>
<body>
<div class="row" style="height: 67px;background-color: #2b2b2b">
    <div class="col-md-1">.col-md-1</div>
    <div class="col-md-1">.col-md-1</div>
</div>
<div class="modal fade" id="resultMessage" tabindex="1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">操作结果</h4>
        </div>
        <div class="modal-content">
            <div class="modal-body" id="messageBody">
            </div>
            <div class="modal-footer">
                <button type="button"   data-dismiss="modal" class="btn btn-primary">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<div class="row">
    <input type="hidden" value="">
    <div class="col-md-2"></div>
    <div class="col-md-8">
        <div class="row" style="margin-top: 30px">
            <div class="panel panel-default">
                <div class="panel-body">
                    <form class="form-horizontal">
                        <div class="form-group" class="form-group">
                            <label class="col-sm-2 control-label" style="text-align: left">订单编号</label>
                            <span class="ml20">${order.orderNo!''}</span>
                        </div>
                        <div class="form-group" class="form-group">
                            <label class="col-sm-2 control-label" style="text-align: left">保费</label>
                            <span class="ml20">${order.premium!''}</span>
                        </div>
                        <div class="form-group" class="form-group">
                            <label class="col-sm-2 control-label" style="text-align: left">保险公司</label>
                            <span class="ml20">${insuranceCompany!''}</span>
                        </div>
                    </form>
                </div>
                <div class="panel-footer">
                    <div class="row">
                        <div class="col-sm-10">
                            <p style="text-align: center;color: red;font-weight: bolder">若在退保过程中遇到任何问题可拨打4001361998进行咨询</p>
                        </div>
                        <div class="col-sm-2">
                            <button id="refund_button" type="button" style="float: right" class="btn btn-primary">退保</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">

        </div>
    </div>
    <div class="col-md-2">

    </div>
</div>
</body>
</html>